<template>
<div>
  <Row>
    <Col span="18">
    <h3 class="sky-tit">科室病人月就诊次数人数汇总表</h3>
    </Col>
        <Col span="6" class="ivu-text-right">
    <DatePicker type="month"></DatePicker>
    </Col>
  </Row>
  <Table :columns="columns" :data="data" show-summary :loading="loading">
  </Table>
    <h3 class="sky-tit sky-mt">科室病人年度在诊周期病人人数汇总表</h3>
  <Table :columns="columns1" :data="data" :loading="loading" show-summary>
  </Table>
  </div>
</template>
<script>
    export default {
        data () {
            return {
                loading: true,
                columns: [
                    {
                        title: '诊室',
                        key: 'room',
                        width: 100,
                        fixed: 'left'
                    },
                    {
                        title: '1次',
                        key: 'second1',
                        minWidth: 60
                    },
                    {
                        title: '2次',
                        key: 'second2',
                        minWidth: 60
                    },
                    {
                        title: '3次',
                        key: 'second3',
                        minWidth: 60
                    },
                    {
                        title: '4次',
                        key: 'second4',
                        minWidth: 60
                    },
                    {
                        title: '5次',
                        key: 'second5',
                        minWidth: 60
                    },
                    {
                        title: '6次',
                        key: 'second6',
                        minWidth: 60
                    },
                    {
                        title: '7次',
                        key: 'second7',
                        minWidth: 60
                    },
                    {
                        title: '8次',
                        key: 'second8',
                        minWidth: 60
                    },
                    {
                        title: '9次',
                        key: 'second9',
                        minWidth: 60
                    },
                    {
                        title: '10次',
                        key: 'second10',
                        minWidth: 70
                    },
                    {
                        title: '11次',
                        key: 'second11',
                        minWidth: 70
                    },
                    {
                        title: '12次',
                        key: 'second12',
                        minWidth: 70
                    },
                    {
                        title: '13次',
                        key: 'second13',
                        minWidth: 70
                    },
                    {
                        title: '14次',
                        key: 'second14',
                        minWidth: 70
                    },
                    {
                        title: '15次',
                        key: 'second15',
                        minWidth: 70
                    }
                ],
                columns1: [
                    {
                        title: '诊室',
                        key: 'room',
                        minWidth: 70,
                        fixed: 'left'
                    },
                    {
                        title: '1个月',
                        key: 'second1',
                        minWidth: 75
                    },
                    {
                        title: '2个月',
                        key: 'second2',
                        minWidth: 75
                    },
                    {
                        title: '3个月',
                        key: 'second3',
                        minWidth: 75
                    },
                    {
                        title: '4个月',
                        key: 'second4',
                        minWidth: 75
                    },
                    {
                        title: '5个月',
                        key: 'second5',
                        minWidth: 75
                    },
                    {
                        title: '6个月',
                        key: 'second6',
                        minWidth: 75
                    },
                    {
                        title: '7个月',
                        key: 'second7',
                        minWidth: 75
                    },
                    {
                        title: '8个月',
                        key: 'second8',
                        minWidth: 75
                    },
                    {
                        title: '9个月',
                        key: 'second9',
                        minWidth: 75
                    },
                    {
                        title: '10个月',
                        key: 'second10',
                        minWidth: 80
                    },
                    {
                        title: '11个月',
                        key: 'second11',
                        minWidth: 80
                    },
                    {
                        title: '12个月',
                        key: 'second12',
                        minWidth: 80
                    },
                    {
                        title: '1年以上',
                        key: 'second13',
                        minWidth: 90
                    },
                    {
                        title: '2年以上',
                        key: 'second14',
                        minWidth: 90
                    },
                    {
                        title: '3年以上',
                        key: 'second15',
                        minWidth: 90
                    }
                ],
                data: []
            }
        },
        mounted () {
            const data = [];
            setTimeout(() => {
                for (let i = 1; i <= 8; i++) {
                    data.push({
                        room: i + '诊',
                        second1: Math.round(Math.random() * 10),
                        second2: Math.round(Math.random() * 10),
                        second3: Math.round(Math.random() * 10),
                        second4: Math.round(Math.random() * 10),
                        second5: Math.round(Math.random() * 10),
                        second6: Math.round(Math.random() * 10),
                        second7: Math.round(Math.random() * 10),
                        second8: Math.round(Math.random() * 10),
                        second9: Math.round(Math.random() * 10),
                        second10: Math.round(Math.random() * 10),
                        second11: Math.round(Math.random() * 10),
                        second12: Math.round(Math.random() * 10),
                        second13: Math.round(Math.random() * 10),
                        second14: Math.round(Math.random() * 10),
                        second15: Math.round(Math.random() * 10)
                    })
                }
                this.data = data;
                this.loading = false
            }, 1000)
        }
    }
</script>
<style scoped>
.sky-tit {
  font-size:14px !important;
  margin:8px 0 16px;
}
.sky-mt {
  margin-top:32px;
}
</style>
